package cn.com.dmg.myspringboot.quartz;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

import org.quartz.Job;
import org.quartz.JobExecutionContext;

public class TestJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        String taskCode = jobExecutionContext.getJobDetail().getKey().getName();
        String data = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        System.out.println("taskCode：" + taskCode + ",current time ：" + data);
    }
}
